#ifndef AUXILIAR_H_
#define AUXILIAR_H_

#include "includes.h"

double dot(const double *a, const double *b);

double F_area(pFace face);

void swap(int *IJ);

void swap(double &a, double &b);

double norm(const double *n);

void multTensorVector2D(const double *tensor, const double *vec, double *mult);

double strToDouble(string &str);

int strToInteger(string &str);

const char* getSubString(string &str);

void getEdgesData(pEdge e, double *a);

void swapVertex( vector<pVertex> &vertex);

bool isEdgeOnBdry(pMesh theMesh, pEdge edge);

double getExactSolution(pVertex vertex);

int exportSolutionToVTK(const pMesh theMesh);

void getFCenter(pVertex v1, pVertex v2, pVertex v3, double *center);	

void makeVector(const double *A, const double *B, double *v);

void cross(const double *p1, const double *p2, const double *p3, double *normal);

void cross(const double *v1, const double *v2, double* normal);

void findVertexOpposite(pFace face, pVertex &oppositeVertex);	

void DijVector(pFace face, pVertex &oppositeVertex, double *Dij);

void verifyGeometricCoefficients(pMesh theMesh, set<int> &setOfDomains);

void getTetraWithFace(vector<pEntity> &tetras, pEntity face);

void getVertexOppositeToFace(pEntity tetra, pEntity face, pVertex &node);

void getFCenter(pFace face, double *center);

#endif /*AUXILIAR_H_*/
